﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace FileMonSync
{
    class EventBus
    {
        public static event TrayMenuEventHandler TrayMenuClicked;

        private static List<TrayMenuEventHandler> trayMenuEventHandlerList = new List<TrayMenuEventHandler>();

        public static void addTrayMenuEventListener(TrayMenuEventHandler handler)
        {
            trayMenuEventHandlerList.Add(handler);
        }

        public static void dispatchTrayMenuEventHandler(object sender,TrayMenuEventArgs args)
        {
            foreach(TrayMenuEventHandler handler in trayMenuEventHandlerList)
            {
                handler(sender, args);
            }
        }
    }
}
